<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 700px;
            height: 500px;
        }
    </style>
</head>
<body>
    <div>
        <img src="微信图片_20221115144623.jpg" style="width: 700px; height:500px">
    </div>
    <script>
        var img = document.getElementsByTagName('img')[0];
        const imgArr = ['微信图片_20221115144704.jpg','微信图片_20221115144710.jpg'];
        var count = 0;
        function fn() {
            if (count<1) {
                count++;
            }else{
                count = 0;
            }
            img.src=imgArr[count]
            return setTimeout(fn,3000)
        }
        setTimeout(fn,3000);
    </script>
</body>
</html>